from collections import defaultdict
from skidl import Pin, Part, Alias, SchLib, SKIDL, TEMPLATE

from skidl.pin import pin_types

SKIDL_lib_version = '0.0.1'

MCU_Renesas_Synergy_S1 = SchLib(tool=SKIDL).add_parts(*[
        Part(**{ 'name':'R7FS12878xA01CFL', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'R7FS12878xA01CFL'}), 'ref_prefix':'U', 'fplist':['Package_QFP:LQFP-48_7x7mm_P0.5mm'], 'footprint':'Package_QFP:LQFP-48_7x7mm_P0.5mm', 'keywords':'32-bit ARM Cortex-M0+ MCU Microcontroller', 'description':'', 'datasheet':'https://www.renesas.com/us/en/doc/products/renesas-synergy/doc/r01ds0309eu0100-synergy-s128.pdf', 'search_text':'/usr/share/kicad/symbols/MCU_Renesas_Synergy_S1.kicad_sym\nR7FS12878xA01CFL\n\n32-bit ARM Cortex-M0+ MCU Microcontroller', 'pins':[
            Pin(num='1',name='P400',func=pin_types.BIDIR,unit=1),
            Pin(num='10',name='P409',func=pin_types.BIDIR,unit=1),
            Pin(num='11',name='P408',func=pin_types.BIDIR,unit=1),
            Pin(num='12',name='P407',func=pin_types.BIDIR,unit=1),
            Pin(num='13',name='VSS_USB',func=pin_types.PWRIN,unit=1),
            Pin(num='14',name='USB_DM/P915',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='USB_DP/P914',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='VCC_USB',func=pin_types.PWRIN,unit=1),
            Pin(num='17',name='VCC_USB_LDO',func=pin_types.PWRIN,unit=1),
            Pin(num='18',name='P206',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='RES',func=pin_types.INPUT,unit=1),
            Pin(num='2',name='P401',func=pin_types.BIDIR,unit=1),
            Pin(num='20',name='P201/MD',func=pin_types.BIDIR,unit=1),
            Pin(num='21',name='P200',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='P302',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='P301',func=pin_types.BIDIR,unit=1),
            Pin(num='24',name='SWCLK/P300',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='SWDIO/P108',func=pin_types.BIDIR,unit=1),
            Pin(num='26',name='P109',func=pin_types.BIDIR,unit=1),
            Pin(num='27',name='P110',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='P111',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='P112',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='VCL',func=pin_types.PASSIVE,unit=1),
            Pin(num='30',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='31',name='VSS',func=pin_types.PASSIVE,unit=1),
            Pin(num='32',name='P104',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='P103',func=pin_types.BIDIR,unit=1),
            Pin(num='34',name='P102',func=pin_types.BIDIR,unit=1),
            Pin(num='35',name='P101',func=pin_types.BIDIR,unit=1),
            Pin(num='36',name='P100',func=pin_types.BIDIR,unit=1),
            Pin(num='37',name='P500',func=pin_types.BIDIR,unit=1),
            Pin(num='38',name='P015',func=pin_types.BIDIR,unit=1),
            Pin(num='39',name='P014',func=pin_types.BIDIR,unit=1),
            Pin(num='4',name='P215/XCIN',func=pin_types.BIDIR,unit=1),
            Pin(num='40',name='P013',func=pin_types.BIDIR,unit=1),
            Pin(num='41',name='P012',func=pin_types.BIDIR,unit=1),
            Pin(num='42',name='AVCC0',func=pin_types.PWRIN,unit=1),
            Pin(num='43',name='AVSS0',func=pin_types.PWRIN,unit=1),
            Pin(num='44',name='P011/VREFL0',func=pin_types.BIDIR,unit=1),
            Pin(num='45',name='P010/VREFH0',func=pin_types.BIDIR,unit=1),
            Pin(num='46',name='P002',func=pin_types.BIDIR,unit=1),
            Pin(num='47',name='P001',func=pin_types.BIDIR,unit=1),
            Pin(num='48',name='P000',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='P214/XCOUT',func=pin_types.BIDIR,unit=1),
            Pin(num='6',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='7',name='P213/XTAL',func=pin_types.BIDIR,unit=1),
            Pin(num='8',name='P212/EXTAL',func=pin_types.BIDIR,unit=1),
            Pin(num='9',name='VCC',func=pin_types.PWRIN,unit=1)], 'unit_defs':[] })])